package com.xqboss.apps.domain.guild;

import com.baomidou.mybatisplus.annotation.TableId;
import com.xqboss.apps.domain.BaseTable;
import com.xqboss.apps.enums.consumer.ConsumerTeamRoleEnum;
import com.xqboss.apps.enums.guild.GuildExitStatusEnum;
import com.xqboss.apps.enums.guild.GuildExitTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.persistence.Id;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 公会成员
 * @author wangcong
 * @date 2023-11-01
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("公会成员")
public class GuildMember extends BaseTable implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId
    @Id
    @ApiModelProperty("主键")
    private Long id;

    @ApiModelProperty("公会id")
    private Long guildId;

    @ApiModelProperty("用户id")
    private Long userId;

    @ApiModelProperty("公会角色（1_会长 2_普通成员）")
    private ConsumerTeamRoleEnum role;

    @ApiModelProperty("加入公会时间")
    private LocalDateTime joinTime;

    @ApiModelProperty("退出时间")
    private LocalDateTime exitTime;

    @ApiModelProperty("退出状态（1-主动退出，2-非主动退出）")
    private GuildExitStatusEnum exitStatus;

    @ApiModelProperty("退出类型（1-主动退出，2-会长解散公会，3-被踢出，4-被拒绝，5-后台解散公会）")
    private GuildExitTypeEnum exitType;

    @ApiModelProperty("邀请人id")
    private Long inviteUserId;

    @ApiModelProperty("进入公会是否消耗材料（true-消耗）")
    private Boolean isConsume;

    @ApiModelProperty("贡献值")
    private Integer contribution;
}